<?php

namespace app\index\validate;

use think\Validate;

class Comment extends Validate
{
    protected $rule = [
        'comment'  =>  'require',
        'pid' =>  'require|min:8|max:16',
        'email' => 'require|email',
        'nickname' => 'require',
    ];
    protected $message = [
        'username|require' => '用户名不能为空'
        ,'password|require' => '密码不能为空'
        ,'email|require' => '邮箱不能为空'
        ,'nickname|require' => '昵称不能为空'
    ];
    protected $scene  = [
        'login' => ['username' , 'password']
        ,'register' => ['username' , 'password' , 'email' , 'nickname']
    ];
    
}